Raising Custom Activities

Ektron CMS400.NET's Notification system lets you create and raise your own activity types. Custom activity types can generate notifications, just like standard activity types. See Also: Notifications

To create a custom Activity Type, follow these steps.

1. In the Ektron CMS400.NET Workarea, go to Settings > Community Management > Notifications > Activity Types.

2. Click Add ().

3. The Add Activity Type screen appears.

4. Assign a unique name.

5. Assign an Action Scope from the choices below.

6. Save the screen. Here is a sample custom activity on the View All Activity Types screen.

7. Interested users go to their User Profile screen’s Activities tab. Here, they indicate if they want be notified when the custom activity occurs, and if they want to notify others. See Setting a User’s Notification Activities.

8. Raise a custom activity. To do that, call the Ektron.Cms.Framework.Activity.Activity.Publish method. The method takes an ActivityData class.

You must supply

Note: Custom activity types cannot use Community Management messages as the standard CMS activities do.

Here is an example of that method.

Activity activityApi = new Activity();
ActivityUserInfo user = new ActivityUserInfo() ;
user.Id = activityApi.UserId;
ActivityData activityData = new ActivityData();
activityData.ActionUser = user;
activityData.ActivityTypeId = 1002;
activityData.Message = "John Doe just rated Ektron a buy!";
activityData.LanguageId = 1033;
activityApi.Publish(activityData);

When publish is called, the notification service notifies users who signed up to be notified of this activity.

Previous TopicNext Topic|